Skip to content

feat(warp-core): add WAL evidence segment catalog#644

Merged
flyingrobots merged 17 commits into
mainfrom
echo/wal-evidence-segment-catalog
Jul 8, 2026
Merged

feat(warp-core): add WAL evidence segment catalog#644
flyingrobots merged 17 commits into
mainfrom
echo/wal-evidence-segment-catalog

Conversation

@flyingrobots

Copy link
Copy Markdown
Owner

Summary

  • Adds a rebuildable CausalSegmentCatalog over committed WAL recovery evidence, with one base evidence segment per committed WAL transaction.
  • Adds a non-authoritative live catalog cache in TrustedRuntimeWal; cache update failures mark the catalog NeedsRebuild without turning successful WAL commits into failures.

Scope

  • Tests only
  • Docs only
  • Runtime code

Links

Checklist

  • CI green (fmt, clippy, tests, rustdoc, audit/deny)
  • Kept PR small and focused (one thing)

Local verification

  • git diff --check
  • cargo fmt --all -- --check
  • cargo clippy -p warp-core --lib
  • cargo clippy -p warp-core --features "native_rule_bootstrap trusted_runtime host_test" --test trusted_runtime_host_loop_tests
  • cargo xtask test-slice runtime-wal-ack
  • cargo xtask test-slice durable-runtime-wal

Notes

  • RED/GREEN was missed for this slice: the implementation landed before the focused witnesses were added. The added witnesses prove the current patched branch behavior, not that the tests failed before the implementation.
  • The catalog is intentionally a derived read model. RecoveryScanReport remains the canonical rebuild seam, and live catalog updates are cache-only posture.
  • No derived WscBundle, CheckpointRange, or ZkWormhole coverage is implemented in this PR; those segment kinds are reserved for later covering evidence.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@flyingrobots, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 21 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: da8d4839-fcc8-44fa-963b-042ca6c3d737

📥 Commits

Reviewing files that changed from the base of the PR and between 5c968a4 and cca3ecd.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (11)
  • AGENTS.md
  • CHANGELOG.md
  • Cargo.toml
  • crates/echo-trace/Cargo.toml
  • crates/echo-trace/README.md
  • crates/echo-trace/src/lib.rs
  • crates/warp-core/src/causal_wal.rs
  • crates/warp-core/src/evidence.rs
  • crates/warp-core/src/lib.rs
  • crates/warp-core/src/trusted_runtime_host.rs
  • crates/warp-core/tests/trusted_runtime_host_loop_tests.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch echo/wal-evidence-segment-catalog

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b168e48436

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/warp-core/src/trusted_runtime_host.rs Outdated
Comment thread crates/warp-core/src/trusted_runtime_host.rs Outdated
Comment thread crates/echo-trace/Cargo.toml
Comment thread crates/echo-trace/src/lib.rs Outdated
@flyingrobots

Copy link
Copy Markdown
Owner Author

@codex second opinion requested. Code Lawyer self-audit found additional issues beyond the unresolved review threads.

Priority File Lines Issue Required action
P2 crates/warp-core/src/evidence.rs 164-177, 208-223 coverings_by_range is documented as the range index but committed base segments are never inserted into it. Add a deterministic regression proving base segments are range-query indexed, then populate the range index for committed transaction segments.
P2 crates/warp-core/tests/trusted_runtime_host_loop_tests.rs 1581-1590 Empty placeholder test compiles without asserting the advertised failure posture. Replace with a real regression for the catalog failure/recovery behavior or remove the fake test while covered elsewhere.
P3 crates/echo-trace/Cargo.toml, crates/echo-trace/src/lib.rs, crates/warp-core/src/evidence.rs file headers scripts/check_spdx.sh fails on three new files. Add the repository-standard SPDX/copyright headers.

I will address these in the same priority queue as the review-thread findings unless a human redirects scope.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b168e48436

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/warp-core/src/evidence.rs
Comment thread crates/warp-core/tests/trusted_runtime_host_loop_tests.rs Outdated
Comment thread crates/echo-trace/src/lib.rs Outdated
Comment thread crates/echo-trace/Cargo.toml
Comment thread crates/warp-core/src/trusted_runtime_host.rs Outdated
Comment thread crates/echo-trace/Cargo.toml
@flyingrobots

Copy link
Copy Markdown
Owner Author

Activity Summary

Severity Source File Issue Commit Outcome
P2 PR crates/warp-core/src/trusted_runtime_host.rs Rebuild live evidence catalog after recovered filesystem WAL commits 934d4c70 Regression added; recovery refresh rebuilds catalog; duplicate threads resolved
P2 PR crates/warp-core/src/trusted_runtime_host.rs Preserve the real last-good commit when catalog update fails 65a5057d Regression replaced placeholder; posture records prior fresh commit; thread resolved
P2 PR crates/echo-trace/Cargo.toml Add required package metadata 348a6b73 Metadata and crate README added; duplicate metadata threads resolved
P2 PR crates/echo-trace/src/lib.rs Format echo-trace source fbf6d53c rustfmt applied; duplicate format threads resolved
P2 Self crates/warp-core/src/evidence.rs Populate coverings_by_range for base committed segments a510da10 Regression added; range index now maps exact LSN range to segment ID; thread resolved
P2 Self crates/warp-core/tests/trusted_runtime_host_loop_tests.rs Replace placeholder catalog-failure test 65a5057d Placeholder replaced with deterministic WAL-success/catalog-failure regression; thread resolved
P3 Self crates/echo-trace/Cargo.toml, crates/echo-trace/src/lib.rs, crates/warp-core/src/evidence.rs Add repository SPDX headers 348a6b73, fbf6d53c, f053004e SPDX checker green; thread resolved
P3 Self CHANGELOG.md Document evidence catalog invariant fixes 58637e29 Changelog updated because the fixes alter catalog invariants

Validation run locally after fixes:

  • cargo fmt --all -- --check
  • scripts/check_spdx.sh
  • cargo clippy -p echo-trace --lib --tests -- -D warnings
  • cargo check -p echo-trace
  • cargo clippy -p warp-core --lib -- -D warnings
  • cargo check -p warp-core
  • cargo test -p warp-core evidence::tests::test_base_segments_populate_covering_range_index
  • cargo test -p warp-core --test trusted_runtime_host_loop_tests runtime_wal_live_evidence_catalog_rebuilds_after_recovered_filesystem_ack --features native_rule_bootstrap,trusted_runtime,host_test
  • cargo test -p warp-core --test trusted_runtime_host_loop_tests runtime_wal_live_evidence_catalog_failure_marks_needs_rebuild_without_failing_commit --features native_rule_bootstrap,trusted_runtime,host_test
  • cargo test -p warp-core --test trusted_runtime_host_loop_tests runtime_wal_live_evidence_catalog_matches_read_only_recovery_after_submission --features native_rule_bootstrap,trusted_runtime,host_test

All previously unresolved review threads are resolved via GraphQL; unresolved thread count is now 0.

@flyingrobots

Copy link
Copy Markdown
Owner Author

Code Lawyer Self-Review

@codex second opinion requested on this strict self-review finding.

Severity File Lines Type Issue Recommended mitigation prompt
P5 Cargo.toml 31-32 Style / manifest consistency The new echo-trace workspace member is appended as , "crates/echo-trace"] after the existing closing-list style instead of following the established one-item-per-line member formatting. This is valid TOML, but it is repository-style drift in the root manifest. Normalize the root Cargo.toml workspace members list by moving "crates/echo-trace" onto its own list entry with the same trailing-comma formatting as the surrounding workspace members; do not change dependency semantics.

No P0-P4 functional, determinism, API, Markdown, SPDX, audit, or CI issues were found in this pass. Evidence checked: clean worktree before review, git fetch origin, git diff origin/main...HEAD, Graft reads of the new catalog implementation, targeted WAL integration/test review, git diff --check, Markdown lint for changed Markdown, and current PR checks.

@flyingrobots

Copy link
Copy Markdown
Owner Author

Resolved the strict self-review P5 manifest formatting issue in 638d0610.

Severity File Commit Outcome
P5 Cargo.toml 638d0610 Normalized crates/echo-trace to the established one-entry-per-line workspace member formatting.

Validation after the fix:

  • git diff --check
  • cargo metadata --format-version=1 --no-deps
  • cargo check -p echo-trace

@codex please confirm the self-review finding is fully resolved.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 638d061049

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@flyingrobots

Copy link
Copy Markdown
Owner Author

Code Lawyer Self-Review — Recheck

@codex second opinion requested: this recheck found no new actionable violations at current head 638d0610.

Severity Count Result
P0 Critical 0 None found
P1 High 0 None found
P2 Medium 0 None found
P3 Low 0 None found
P4 Minor 0 None found
P5 Style 0 None found
Area Evidence
Lockdown Clean worktree before review; git fetch origin completed.
Diff scope Reviewed origin/main...HEAD for PR #644 at 638d0610, base main.
Graft reads Re-read Cargo.toml, crates/warp-core/src/evidence.rs, crates/warp-core/src/trusted_runtime_host.rs, and crates/echo-trace/src/lib.rs through Graft.
Formatting / style git diff --check origin/main...HEAD, cargo fmt --all -- --check, npx markdownlint-cli2 AGENTS.md CHANGELOG.md crates/echo-trace/README.md, and scripts/check_spdx.sh all passed.
Build / focused witness cargo metadata --format-version=1 --no-deps, cargo check -p echo-trace, and cargo test -p warp-core evidence::tests::test_base_segments_populate_covering_range_index passed.
Remote gate gh pr checks 644 reports all checks passing, including CodeRabbit Review completed.

The prior P5 root-manifest formatting issue is resolved by 638d0610; no additional Code Lawyer findings are open from this recheck.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 638d061049

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/warp-core/src/evidence.rs
@flyingrobots flyingrobots merged commit f53d46f into main Jul 8, 2026
37 checks passed
@flyingrobots flyingrobots deleted the echo/wal-evidence-segment-catalog branch July 8, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant